import { DEFAULT_LAYOUT } from '../base';
import serviceManagement from '@/layout/serviceManagement.vue';
import path from 'path';
import {  qiankunWindow,} from "vite-plugin-qiankun/dist/helper";
const status = (qiankunWindow && qiankunWindow.__POWERED_BY_QIANKUN__) 
const DASHBOARD: any = {
  path: '/serviceMange',
  name: 'serviceMange',
  component: location.ancestorOrigins.length ? serviceManagement : DEFAULT_LAYOUT,
  // component: serviceManagement,
  // component: serviceManagement,
  meta: {
    locale: '服务管理',
    requiresAuth: true,
    icon: 'icon-dashboard',
    order: 4,
  },
  children: [
    {
      path: 'requirement',
      name: 'requirement',
      component: () => import('@/views/requirement/list/index.vue'),
      meta: {
        locale: '需求单管理',
        requiresAuth: true,
        roles: ['*'],
        keepAlive: true,
      },
    },
    {
      path: 'serviceOrder',
      name: 'serviceOrder',
      component: () => import('@/views/serviceOrder/index.vue'),
      meta: {
        locale: '服务订单管理',
        requiresAuth: true,
        roles: ['*'],
        keepAlive: true,
      },
    },
    {
      path: 'refund',
      name: 'refund',
      component: () => import('@/views/refund/index.vue'),
      meta: {
        locale: '退款管理',
        requiresAuth: true,
        roles: ['*'],
        keepAlive: true,
      },
    },

      
    {
      path: 'demand',
      name: 'demand',
      component: () => import('@/views/demandComplaint/index.vue'),
      meta: {
        locale: '升级投诉列表',
        requiresAuth: true,
        roles: ['*'],
        keepAlive: true,
      },
      
    },
    {
      path: 'user',
      name: 'user',
      component: () => import('@/views/user/index.vue'),
      meta: {
        locale: '用户管理',
        requiresAuth: true,
        roles: ['*'],
        keepAlive: true,
      },
      
    },
    {
      path: 'serverIndex',
      name: 'serverIndex',
      component: () => import('@/views/server/clean/index.vue'),
      meta: {
        locale: '服务管理',
        requiresAuth: true,
        roles: ['*'],
        keepAlive: true,
      },
    },
    {
      path: 'classify',
      name: 'classify',
      component: () => import('@/views/config/class/index.vue'),
      meta: {
        locale: '四级分类',
        requiresAuth: true,
        roles: ['*'],
        keepAlive: true,
      },
    },
    {
      path: 'tag',
      name: 'tag',
      component: () => import('@/views/config/tag/index.vue'),
      meta: {
        locale: '标签管理',
        requiresAuth: true,
        roles: ['*'],
        keepAlive: true,
      },
    },
 
    {
      path: 'agreement',
      name: 'agreement',
      component: () => import('@/views/config/agreement/index.vue'),
      meta: {
        locale: '协议管理',
        requiresAuth: true,
        roles: ['*'],
        keepAlive: true,
      },
    },
    {
      path: 'satisfaction',
      name: 'satisfaction',
      component: () => import('@/views/satisfaction/index.vue'),
      meta: {
        locale: '满意度管理',
        requiresAuth: true,
        roles: ['*'],
        keepAlive: true,
      },
    },
    {
      path: 'questionnaireResult',
      name: 'questionnaireResult',
      component: () => import('@/views/questionnaireResult/index.vue'),
      meta: {
        locale: '问卷列表',
        requiresAuth: true,
        roles: ['*'],
        keepAlive: true,
      },
    },
    {
      path: 'capacity',
      name: 'capacity',
      component: () => import('@/views/capacity/index.vue'),
      meta: {
        locale: '产能配置',
        requiresAuth: true,
        roles: ['*'],
        keepAlive: true,
      },
    },
    {
      path: 'city',
      name: 'city',
      component: () => import('@/views/config/city/index.vue'),
      meta: {
        locale: '城市配置',
        requiresAuth: true,
        roles: ['*'],
        keepAlive: true,
      },
    },
    {
      path: 'order',
      name: 'order',
      // component: () => import('@/views/order/index.vue'),
      meta: {
        locale: '派单管理',
        requiresAuth: true,
        roles: ['*'],
        keepAlive: true,
      },
      children: [
        {
          path: 'list',
          name: 'orderList',
          component: () => import('@/views/order/sendOrders/index.vue'),
          meta: {
            locale: '订单列表',
            requiresAuth: true,
            roles: ['*'],
            keepAlive: true,
          },
        },
        {
          path: 'list',
          name: 'outlier',
          component: () => import('@/views/order/outlier/index.vue'),
          meta: {
            locale: '异常订单',
            requiresAuth: true,
            roles: ['*'],
            keepAlive: true,
          },
        },
      ],
    },
    {
      path: 'servicePersonnel',
      name: 'servicePersonnel',
      component: () =>  import('@/views/servicePersonnel/index.vue'),
      meta: {
        locale: '服务人员',
        requiresAuth: true,
        roles: ['*'],
        keepAlive: true,
      },
    },
    
    {
      path: 'serviceTeam',
      name: 'serviceTeam',
      component: () =>  import('@/views/serviceTeam/index.vue'),
      meta: {
        locale: '服务小组',
        requiresAuth: true,
        roles: ['*'],
        keepAlive: true,
      },
    },

  
 

    //  {
    //   path: 'audit',
    //   name: 'audit',
    //   component: () => import('@/views/audit/index.vue'),
    //   meta: {
    //     locale: '审批管理',
    //     requiresAuth: true,
    //     roles: ['*'],
    //     keepAlive: true,
    //   },
      
    // },

  ],
};

export default DASHBOARD;
